import { defineNuxtConfig } from "nuxt/config";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import "./tools/EnvLoader";

export default defineNuxtConfig({
  srcDir: "src/",
  css: ["@/assets/css/index.scss"],
  app: {
    head: {
      title: process.env.VITE_APP_NAME || "Discuz Q",
      link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.png" }]
    },
    pageTransition: { name: "page", mode: "out-in" },
    layoutTransition: { name: "page", mode: "out-in" }
  },
  imports: {
    dirs: ["composables", "composables/*/index.ts"]
  },
  vite: {
    plugins: [
      Components({
        resolvers: [
          ElementPlusResolver({
            ssr: true,
            importStyle: "sass"
          })
        ]
      })
    ]
  },
  typescript: {
    strict: true,
    typeCheck: true
  }
});
